<?php

$page = "index";
if (isset($pageValue)) $page = $pageValue;

include_once("root.php");

// Security Scheme.  Configure the roles and what pages
//   they have access to.
include_once($ROOT . "base.inc.php");

// $userId is set in the including file so that this actually works within a session.
$userRoles = UserUtil::getRoles($userId);
if (!UserUtil::hasPermission($userRoles, $page))
{
	// If the user doesn't have permission, redirect them to another
	//   location.
	$page = "noPermission";
}

include_once($ROOT . "control/$page" . "Controller.php");
$c = & new PageController();

?>

<?php include_once($ROOT . "actions/$page.php"); ?>